package models

import (
	"github.com/goravel/framework/database/orm"
)

type BankLog struct {
	orm.Model
	ActionTime      string         `gorm:"column:action_time;type:datetime(3);not null" form:"action_time" json:"action_time"`
	UserName        string         `gorm:"column:user_name;type:varchar(255);not null" form:"user_name" json:"user_name"`
	StreamId        string         `gorm:"column:stream_id;type:varchar(255);not null" form:"stream_id" json:"stream_id"`
	TradeType       string         `gorm:"column:trade_type;type:varchar(255);not null" form:"trade_type" json:"trade_type"`
	CardId          string         `gorm:"column:card_id;type:varchar(255);not null" form:"card_id" json:"card_id"`
	CardBalance     string         `gorm:"column:card_balance;type:varchar(255);not null" form:"card_balance" json:"card_balance"`
	CardType        string         `gorm:"column:card_type;type:varchar(255);not null"form:"card_type" json:"card_type"`
	Description     string         `gorm:"column:description;type:varchar(255);null" form:"description" json:"description"`
	Location        string         `gorm:"column:location;type:varchar(255);null" form:"location" json:"location"`
	OwnerId         string         `gorm:"column:owner_id;type:varchar(255);null" form:"owner_id" json:"owner_id"`
	OwnerName       string         `gorm:"column:owner_name;type:varchar(255);null" form:"owner_name" json:"owner_name"`
	OwnerStreamId   string         `gorm:"column:owner_stream_id;type:varchar(255);null" form:"owner_stream_id" json:"owner_stream_id"`
	OriginalText    string         `gorm:"column:original_text;type:text;not null;comment:'原文'" json:"original_text"`
	ConfigurationID int            `gorm:"column:configuration_id;type:int;null" form:"configuration_id" json:"configuration_id"`
	Configuration   *Configuration `gorm:"foreignkey:ConfigurationID" form:"-" json:"-"`
}

// TableName sets the insert table name for this struct type
func (b *BankLog) TableName() string {
	return "banklogs"
}
